My slides:
Edge-weighted graphs (
Power Point).
Reading: Algorithms 4.3 and 4.4.
Edge-weighted graphs:
Base classes:
Graph.java,
Node.java,
UndirectedEdge.java, and
DirectedEdge.java.
Edge-weighted undirected graphs:
EdgeWeightedUndirectdGraph.java,
PrimMST.java (cf., DijkstraShortestPath.java), and
KruskalMST.java.
Edge-weighted directed graphs:
EdgeWeightedDirectedGraph.java and
DijkstraShortestPath.java (cf., PrimMST.java).